package com.sgj.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: Guoji Shen
 * @Date: 2022/5/11 13:14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Document("users")
public class User {

    @Id
    private String id;

    @Field(name = "username")
    private String name;

    @Field(name = "salary")
    private BigDecimal salary;

    @Field(name = "birthday")
    private Date birthday;
}